<?php
$sid = session('suppliers_id');
$ary = array(

//    'caiwu' => array('name' => '财务管理','parent'=>'财务管理', 'child' => array(
//        array('name' => '财务', 'child' => array(
//            array('name' => '提现列表', 'act' => 'index', 'op' => 'Withdrawals','child'=>[
//                ['name'=>'提现设置','act'=>'txset','op'=>'Caiwu'],
//                ['name'=>'同意提现','act'=>'agrees'],
//                ['name'=>'拒绝提现','act'=>'refunds'],
//                ['name'=>'提现导出','act'=>'export_order'],
//            ]),
//        )),
//        array('name' => '统计', 'child' => array(
//            array('name' => '销售统计', 'act' => 'index', 'op' => 'Report'),
//            array('name' => '会员统计', 'act' => 'user', 'op' => 'Report'),
//        )),
//    )),
    'shop' => array('name' => '商品管理','parent'=>'商城管理', 'child' => array(
        array('name' => '商家设置', 'child' => array(
            array('name' => '商家设置', 'act' => 'edit', 'op' => 'Suppliers', 'par' => 'id/'.$sid,'child'=>[
            ]),
        )),
        array('name' => '商品', 'child' => array(
            array('name' => '商品列表', 'act' => 'index', 'op' => 'Goods','child'=>[
                ['name'=>'商品列表添加编辑','act'=>'addEdit'],
                ['name'=>'商品列表删除|批量删除','act'=>'del'],
                ['name'=>'商品列表导出','act'=>'export_order'],
            ]),
            array('name' => '库存日志', 'act' => 'index', 'op' => 'StockLog','child'=>[
                ['name'=>'库存日志导出','act'=>'export_order'],
            ]),
            array('name' => '商品分类', 'act' => 'index', 'op' => 'GoodsCategory','child'=>[
                ['name'=>'商品分类添加编辑','act'=>'addEdit'],
                ['name'=>'商品分类删除','act'=>'del'],
            ]),
            array('name' => '评论列表', 'act' => 'index', 'op' => 'Comment','child'=>[
                ['name'=>'评论列表删除','act'=>'del'],
            ]),
        )),
        array('name' => '订单', 'child' => array(
            array('name' => '全部订单', 'act' => 'index', 'op' => 'Order','child'=>[
                ['name'=>'订单详情','act'=>'detail'],
                ['name'=>'订单发货','act'=>'delivery_info,send'],
                ['name'=>'导出订单','act'=>'export_order'],
            ]),
            array('name' => '待支付订单', 'act' => 'index', 'op' => 'Order', 'par' => 'status/0'),
            array('name' => '待发货订单', 'act' => 'index', 'op' => 'Order', 'par' => 'status/1/is_th/1'),
            array('name' => '待收货订单', 'act' => 'index', 'op' => 'Order', 'par' => 'status/2'),
            array('name' => '待评价订单', 'act' => 'index', 'op' => 'Order', 'par' => 'status/3'),
            array('name' => '已完成订单', 'act' => 'index', 'op' => 'Order', 'par' => 'status/4'),
        )),
        array('name' => '财务', 'child' => array(
            array('name' => '货款提现列表', 'act' => 'index', 'op' => 'WithdrawalsSupply','child'=>[
//            ['name'=>'同意提现','act'=>'agrees'],
//            ['name'=>'拒绝提现','act'=>'refunds'],
                ['name'=>'提现导出','act'=>'export_order'],
            ]),
        )),

        array('name' => '统计', 'child' => array(
            array('name' => '销售统计', 'act' => 'index', 'op' => 'Report'),
//            array('name' => '会员统计', 'act' => 'user', 'op' => 'Report'),
        )),
    )),
//    'kuozhan' => array('name' => '扩展', 'child' => array(
//        array('name' => '设计页面', 'child' => array(
//            array('name' => '设计页面', 'act' => 'index', 'op' => 'DesignPage'),
//            array('name' => '编辑页面', 'act' => 'edit', 'op' => 'DesignPage'),
//            array('name' => '底部导航', 'act' => 'index', 'op' => 'DesignMenu'),
//            array('name' => '登录页面', 'act' => 'index', 'op' => 'DesignLogin'),
//        )),
//    )),
//    'system' => array('name' => '系统设置', 'child' => array(
//        array('name' => '设置', 'child' => array(
//            array('name' => '系统设置', 'act' => 'index', 'op' => 'System','child'=>[
//                ['name'=>'系统设置保存','act'=>'handle'],
//            ]),
//            array('name' => '系统日志', 'act' => 'index', 'op' => 'SysLog'),
//        )),
//        array('name' => '文章', 'child' => array(
//            array('name' => '文章列表', 'act' => 'articleList', 'op' => 'Article','child'=>[
//                ['name'=>'文章列表添加编辑','act'=>'article'],
//                ['name'=>'文章列表删除','act'=>'aticleHandle'],
//            ]),
//            array('name' => '文章分类', 'act' => 'categoryList', 'op' => 'Article','child'=>[
//                ['name'=>'文章分类添加编辑','act'=>'category'],
//                ['name'=>'文章分类删除','act'=>'categoryHandle'],
//            ]),
//        )),
//        array('name' => '站内信', 'child' => array(
//            array('name' => '列表', 'act' => 'index', 'op' => 'Msg','child'=>[
//                ['name'=>'回复','act'=>'huifu'],
//                ['name'=>'删除','act'=>'delete'],
//            ]),
////            array('name' => '文章分类', 'act' => 'categoryList', 'op' => 'Article','child'=>[
////                ['name'=>'文章分类添加编辑','act'=>'category'],
////                ['name'=>'文章分类删除','act'=>'categoryHandle'],
////            ]),
//        )),
//        array('name' => '权限', 'child' => array(
//            array('name' => '修改密码', 'act' => 'modify_pwd', 'op' => 'Admin'),
//            array('name' => '管理员列表', 'act' => 'index', 'op' => 'Admin','child'=>[
//                ['name'=>'管理员列表添加编辑','act'=>'admin_info'],
//                ['name'=>'管理员列表删除','act'=>'adminHandle'],
//            ]),
//            array('name' => '角色管理', 'act' => 'role', 'op' => 'Admin','child'=>[
//                ['name'=>'角色管理添加编辑','act'=>'role_info'],
//                ['name'=>'角色管理删除','act'=>'roleHandle'],
//            ]),
//
//        )),
//    )),
);
//财务明细
$wallet = logic('Wallet')->getName();
foreach ($wallet as $key => $val) {
    if($key=='s_money'){
        $ary['shop']['child'][3]['child'][] = array('name' => $val . '明细', 'act' => 's_money_log', 'op' => 'Caiwu', 'par' => 'money_type/' . $key,'child'=>[
            ['name'=>'财务明细导出','act'=>'export_order'],
        ]);
    }
}


return $ary;
